package com.example.rabbitmqc.springboot;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author：wlz
 * @Package：com.example.rabbitmqc.springboot
 * @Project：redis
 * @name：Test
 * @Date：2023/5/29 23:28
 * @Filename：Test
 */
@Component
@RabbitListener(queues = "TestDirectQueue")//监听的队列名称 TestDirectQueue
public class DirectReceiver1 {

    @RabbitHandler
    public void process(Map testMessage) {
        System.out.println("DirectReceiver-----1消费者收到消息  : " + testMessage.toString());
    }

}
